home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / System7 tools / Frontier / DocServer 1.1b5.cpt / DocServer 1.1b5 / DocServer Test Text next >
Encoding:
Text File  |  1992-04-14  |  2.6 KB  |  76 lines  |  [TEXT/DOCS]

  1.  
  2. Verb    Read Me
  3. Notes    Following are the docs for five Frontier verbs that are included with the stack suite.
  4. They are included with beta releases of DocServer 1.1 as examples of the type of on-line documentation that’s available for Frontier script writers
  5. See Also    stack.create
  6. stack.push
  7. stack.pop
  8. stack.dispose
  9. stack.visit
  10.  
  11. Verb    stack.create
  12. Syntax    stack.create ()
  13. Parameters    None.
  14. Action    Creates a new “last-in-first-out” stack with no elements in it.
  15. Returns    The address of the newly allocated stack object.
  16. Examples    scratchpad.nameStack = stack.create ()
  17.     « suites.stack.pool.stack1
  18. Notes    All stacks are created in a sub-table in the stack suite called "pool".
  19. A stack is a table with two items: top indicates how many elements are currently in the stack; vals is a sub-table that stores the stack values.
  20. See Also    stack.push
  21. stack.pop
  22. stack.dispose
  23. stack.visit
  24.  
  25. Verb    stack.push
  26. Syntax    stack.push (adrStack, val)
  27. Parameters    adrStack is the address of a stack object allocated by stack.create.
  28. val is any valid UserTalk expression.
  29. Action    Adds the value at the "top" of the stack.
  30. Returns    True.
  31. Examples    stack.push (scratchpad.nameStack, "Bull Mancuso")
  32.     « true
  33. See Also    stack.create
  34. stack.pop
  35. stack.dispose
  36. stack.visit
  37.  
  38. Verb    stack.pop
  39. Syntax    stack.pop (adrStack)
  40. Parameters    adrStack is the address of a stack object allocated by stack.create.
  41. Action    Deletes the top value on the stack and returns it.
  42. Returns    The value of the top element on the stack.
  43. Examples    stack.pop (scratchpad.nameStack)
  44.     « Bull Mancuso
  45. See Also    stack.create
  46. stack.push
  47. stack.dispose
  48. stack.visit
  49.  
  50. Verb    stack.visit
  51. Syntax    stack.visit (adrStack, callback)
  52. Parameters    adrStack is the address of a stack object allocated by stack.create.
  53. callback is the address of a script that will be called for each element in the stack.
  54. Action    Calls the callback script for each element in the stack.
  55. Returns    True if all the calls to the callback routine returned true.
  56. Examples    stack.visit (scratchpad.nameStack, @msg)
  57.     « true «displays the value of each stack element in Frontier’s main window.
  58. Notes    The callback routine receives exactly one parameter, the value of one of the elements in the stack.
  59. It must return true or false. If it returns false, stack.visit returns false immediately.
  60. See Also    stack.create
  61. stack.push
  62. stack.pop
  63. stack.dispose
  64.  
  65. Verb    stack.dispose
  66. Syntax    stack.dispose (adrStack)
  67. Parameters    adrStack is the address of a stack object allocated by stack.create.
  68. Action    Deletes the table storing the stack object.
  69. Returns    True.
  70. Examples    stack.dispose (scratchpad.nameStack)
  71.     « true
  72. See Also    stack.create
  73. stack.push
  74. stack.pop
  75. stack.visit
  76.